<h4 id="sitemap_heading">
  <span class="page_name"><%= Alchemy::Page.human_attribute_name(:name) %></span>
  <span class="page_urlname"><%= Alchemy::Page.human_attribute_name(:urlname) %></span>
  <span class="page_status"><%= Alchemy.t(:page_status) %></span>
</h4>

<div id="sitemap-wrapper">
</div>

<script id="sitemap-template" type="text/x-handlebars-template">
  <ul id="sitemap" class="list">
    {{> list}}
  </ul>
</script>

<script id="sitemap-list" type="text/x-handlebars-template">
  {{#each children}}
  <%= render partial: page_partial, object: @page_root %>
  {{/each}}
</script>

<script type="module">
 $(function() {
   Alchemy.currentSitemap = new Alchemy.Sitemap({
     url: '<%= alchemy.tree_admin_pages_path %>',
     page_root_id: <%= @page_root.id %>
   });
   Alchemy.PagePublicationFields();
 });
</script>
